<%@ Page Language="C#" MasterPageFile="~/admin/admin.master" AutoEventWireup="true" CodeFile="AddNewImage.aspx.cs" Inherits="admin_AddNewImage" Title="Add New Photo" validateRequest="false" %>
<asp:Content ID="Content2" ContentPlaceHolderID="LinkPlaceHolder" Runat="Server">
</asp:Content>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<script type="text/javascript" language="javascript">     
  function   addTextLink()
  {
    var RegDiv=document.getElementById('ctl00_ContentPlaceHolder1_txbContent');   
    RegDiv.innerHTML += "&lt;a href=\"\" target=\"_blank\" title=\"\"&gt;&lt;/a&gt;";
  }
  function   addBold()
  {
    var RegDiv=document.getElementById('ctl00_ContentPlaceHolder1_txbContent');   
    RegDiv.innerHTML += "&ltb&gt;&lt;/b&gt;";
  }
  </script>
<div style="text-align: left; margin-left: 20px">
Title:
        <br />
        <asp:TextBox ID="txbTitle" runat="server" Width="400px" CssClass="formfield2"></asp:TextBox>
    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txbTitle"
        ErrorMessage="must enter a title"></asp:RequiredFieldValidator><br />
        <br />
        Content:<br />
    [<a href="javascript:addTextLink();">add link</a>]
    [<a href="javascript:addBold();">bold</a>]<br />
        <asp:TextBox ID="txbContent" runat="server" Height="168px" TextMode="MultiLine" Width="400px" CssClass="textarea"></asp:TextBox>
    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txbContent"
        ErrorMessage="must enter some content"></asp:RequiredFieldValidator><br />
        <asp:CheckBox ID="ckbIsCommentOpen" runat="server" Text="Is comment open?" TextAlign="Left" Checked="True" /><br />
    <br />
    Upload the photo:<br />
        <asp:FileUpload ID="picUploader" runat="server" Width="400px" />
    <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="picUploader"
        ErrorMessage="must upload a photo"></asp:RequiredFieldValidator><br />
    <br />
    Upload the small photo: (max 200)<br />
    <asp:FileUpload ID="smallUploader" runat="server" Width="300px" /><br />
    <br />
    Upload the thumb: (75x75)<br />
    <asp:FileUpload ID="thumbUploader" runat="server" Width="200px" /><br />
        <br />
        Lens:
    <br />
        <asp:DropDownList ID="selLens" runat="server" DataSourceID="ods_GetLens" DataTextField="lens" DataValueField="id">
        </asp:DropDownList><asp:ObjectDataSource ID="ods_GetLens" runat="server" DeleteMethod="Delete"
            InsertMethod="Insert" OldValuesParameterFormatString="original_{0}" SelectMethod="GetLensData"
            TypeName="dst_pbTableAdapters.pb_lensTableAdapter" UpdateMethod="Update">
            <DeleteParameters>
                <asp:Parameter Name="Original_id" Type="Int32" />
            </DeleteParameters>
            <UpdateParameters>
                <asp:Parameter Name="lens" Type="String" />
                <asp:Parameter Name="Original_id" Type="Int32" />
            </UpdateParameters>
            <InsertParameters>
                <asp:Parameter Name="lens" Type="String" />
            </InsertParameters>
        </asp:ObjectDataSource>
    <br />
        <br />
        Category:<br />
    <asp:RadioButtonList ID="selCatType" runat="server" RepeatDirection="Horizontal" DataSourceID="ods_GetCatByParent" DataTextField="cat_name" DataValueField="id">
    </asp:RadioButtonList><asp:ObjectDataSource ID="ods_GetCatByParent" runat="server" DeleteMethod="Delete"
            InsertMethod="Insert" OldValuesParameterFormatString="original_{0}" SelectMethod="GetCatByParent"
            TypeName="dst_pbTableAdapters.pb_catTableAdapter" UpdateMethod="Update">
            <DeleteParameters>
                <asp:Parameter Name="Original_id" Type="Int32" />
            </DeleteParameters>
            <UpdateParameters>
                <asp:Parameter Name="cat_name" Type="String" />
                <asp:Parameter Name="cat_des" Type="String" />
                <asp:Parameter Name="cat_parent" Type="Int32" />
                <asp:Parameter Name="Original_id" Type="Int32" />
            </UpdateParameters>
            <SelectParameters>
                <asp:Parameter DefaultValue="1" Name="catparent" Type="Int32" />
            </SelectParameters>
            <InsertParameters>
                <asp:Parameter Name="cat_name" Type="String" />
                <asp:Parameter Name="cat_des" Type="String" />
                <asp:Parameter Name="cat_parent" Type="Int32" />
            </InsertParameters>
        </asp:ObjectDataSource>
        <br />
        Place TAG - 1:
        <asp:TextBox ID="txbPlace1" runat="server" CssClass="formfield2"></asp:TextBox>
    <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="txbPlace1"
        ErrorMessage="must enter a place"></asp:RequiredFieldValidator><br />
    <br />
        Place TAG - 2:
        <asp:TextBox ID="txbPlace2" runat="server" CssClass="formfield2"></asp:TextBox><br />
        <br />
        <asp:Button ID="btnPublish" runat="server" OnClick="btnPublish_Click" Text="Publish" />&nbsp;&nbsp;
    &nbsp; &nbsp;<asp:Button
            ID="btnDraft" runat="server" OnClick="btnDraft_Click" Text="Draft" Width="66px" /><br />
        <br />
    <asp:Label ID="lblErrInfo" runat="server" ForeColor="Red"></asp:Label><br />
</div>
</asp:Content>

